import request from '@/utils/request'

export function fetchBalanceRecordList(data) {
  return request({
    url: '/finance/balance-records',
    method: 'post',
    data
  })
}

export function createBalanceRecord(data) {
  return request({
    url: '/finance/counter-payment',
    method: 'post',
    data
  })
}

export function downloadBalanceRecord(data) {
  return request({
    url: '/finance/balance-records-export',
    method: 'post',
    responseType: 'blob',
    data
  })
}

export function downloadPaymentReceipt(data) {
  return request({
    url: '/finance/print-payment',
    method: 'post',
    responseType: 'blob',
    data
  })
}

export function createBalanceRefund(data) {
  return request({
    url: '/finance/counter-refund',
    method: 'post',
    data
  })
}

export function fetchWaterBillList(data) {
  return request({
    url: '/finance/bills',
    method: 'post',
    data
  })
}

export function fetchAbnormalWaterBillList(data) {
  return request({
    url: '/finance/abnormal-bills',
    method: 'post',
    data
  })
}

export function createWaterBill(data) {
  return request({
    url: '/finance/create-bill',
    method: 'post',
    data
  })
}

export function settleBill(data) {
  return request({
    url: '/finance/bill-settlement',
    method: 'post',
    data
  })
}

export function createRev(data) {
  return request({
    url: '/finance/create-rev',
    method: 'post',
    data
  })
}

export function fetchRevList(data) {
  return request({
    url: '/finance/rev-list',
    method: 'post',
    data
  })
}

export function fetchBillTaskList(data) {
  return request({
    url: '/finance/task-list',
    method: 'post',
    data
  })
}

export function createBillTask(data) {
  return request({
    url: '/finance/task-create',
    method: 'post',
    data
  })
}

export function updateBillTask(data) {
  return request({
    url: '/finance/task-update',
    method: 'post',
    data
  })
}

export function waterAmountHistory(data) {
  return request({
    url: '/finance/water-amount-history',
    method: 'post',
    data
  })
}

export function fetchPayments(data) {
  return request({
    url: '/finance/payment-list',
    method: 'post',
    data
  })
}


